﻿using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace Assets.Scripts.UI
{
    public class MainMenuPanel : BasePanel
    {

        /// <summary>
        /// 开始游戏
        /// </summary>
        public void OnStartBtnPressed()
        {
            GameManager.Instance.TranslateNextLevel("GameScene", GameState.Gaming);
        }
        /// <summary>
        /// 加载游戏
        /// </summary>
        public void OnLoadBtnPressed()
        {

        }
        /// <summary>
        /// 打开图鉴
        /// </summary>
        public void OnRecordBtnPressed()
        {

        }
        /// <summary>
        /// 设置
        /// </summary>
        public void OnSettingBtnPressed()
        {
            UIManager.Instance.PushPanel(UIPanelType.SettingPanel);
        }
        /// <summary>
        /// 退出游戏
        /// </summary>
        public void OnExitBtnPressed()
        {
#if UNITY_EDITOR
            UnityEditor.EditorApplication.isPlaying = false;
#else
            Application.Quit();
#endif
        }
    }
}